﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nHydrate.Generator.Models;

namespace nHydrate.Core.SQLGeneration
{
	internal static class Globals
	{
		public static string GetTableDatabaseName(ModelRoot model, Table table)
		{
			var retval = model.Database.TablePrefix;
			if (!string.IsNullOrEmpty(retval))
				return retval + "_" + table.DatabaseName;
			else
				return table.DatabaseName;
		}
	}
}
